/*
*  Copyright 2019-2023 CY
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.xiao.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import java.sql.Timestamp;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
* @description /
* @author cg
* @date 2024-06-20
**/
@Data
@TableName("cg_design")
public class CgDesign implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "客户名称")
    private String customerName;

    @ApiModelProperty(value = "客户电话")
    private String customerTel;

    @ApiModelProperty(value = "设计周期开始")
    private Timestamp cycleStart;

    @ApiModelProperty(value = "设计周期结束")
    private Timestamp cycleEnd;

    @ApiModelProperty(value = "计划收款金额")
    private Double planAmount;

    @ApiModelProperty(value = "收款金额合计")
    private Double totalAmount;

    @ApiModelProperty(value = "收款备注")
    private String remark;

    @ApiModelProperty(value = "部门ID")
    private Long deptId;

    @ApiModelProperty(value = "业务公司")
    private String deptName;

    @ApiModelProperty(value = "创建者")
    private String createBy;

    @ApiModelProperty(value = "更新者")
    private String updateBy;

    @ApiModelProperty(value = "创建日期")
    private Timestamp createTime;

    @ApiModelProperty(value = "更新时间")
    private Timestamp updateTime;

    @ApiModelProperty(value = "创建者所属公司ID")
    private Long createDeptId;

    @ApiModelProperty(value = "创建者所属公司名称")
    private String createDeptName;


    @ApiModelProperty(value = "收款状态 1未完成2已完成")
    private String status;

    @ApiModelProperty(value = "设计子表")
    @TableField(exist = false)
    List<CgDesignInfo> listInfo;

    @ApiModelProperty(value = "创建者中文")
    @TableField(exist = false)
    private String createUserName;

    public void copy(CgDesign source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
